<template>
    <div>
        <div class="mui-numbox"  data-numbox-min="1" style=" height:25px">
            <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
            <input class="mui-numbox-input" type="number" @change='buyNumChange' ref='NumChange' :value='initcount' readonly/>
            <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
            
        </div>
    </div>
</template> 


<script>
import mui from '../../lib/mui/js/mui.min'
export default {
     mounted(){
        mui('.mui-numbox').numbox()
    },
    methods:{
        buyNumChange(){
           this.$store.commit('updateGoodsInfo',{id:this.goodsid,count:this.$refs.NumChange.value})
        //    console.log(this.$refs)
        }
    },
    props:['initcount','goodsid']

}
</script>